|
|
|
|
|
|
|
Common Picture Control Properties |
|
|
|
|
|
|
|
|
Table 3.11 lists the properties youll change most often for the picture control. |
|
|
|
|
| Table 3.11 Common Picture Control Properties. | | Property | Description | | Align | Set this property to None, Align Top, Align Bottom, Align Left, or Align Right to make the picture control align or not align to the form. | | AutoSize | Set this property to True if you want to have the picture control automatically adjust its size to the size of the graphic loaded into the control. If this property is set to False and the size of the graphic is larger than the size of the picture control, the graphic will be clipped. | | BorderStyle | Set this property to either None or to Fixed Single. | | Name | Set this property to the value you want to use to refer to the control in your code. You should preface the name with the letters pic. | | Picture | This property can be set to a bitmap, GIF, or JPEG file. |
|
|
|
|
|
|
The image control is a lightweight version of the picture control. Unlike the picture control, the image control does not have an Align property. However, this control does have a Stretch property that allows the graphic thats placed in it to be stretched to the size of the control. Other than these differences, the image control is essentially the same as the picture control. If all youre doing is displaying a graphic, you should always use an image control. If you need to align controls to the top or bottom of a form, you may want to use a picture control instead. |
|
|
|
|
|
|
|
|
In this chapter, you learned how to create a new project using Visual Basic. You learned how to make a form into a running application. You added controls to the form and set properties to change the look and behavior of those controls. Along the way, you learned about the prefixes used to name each of the different controls. |
|
|
|
|
|